using MediatR;
using S.O.ErrorCode;

namespace S.O.Api.Write.Application.Command.Medical
{
    /// <summary>
    /// 创建挂号记录命令
    /// 实现患者门诊挂号功能，包含科室选择、医生预约、费用计算等完整流程
    /// </summary>
    public class CreateRegistrationCommand : IRequest<APIResult<string>>
    {
        /// <summary>
        /// 患者ID
        /// </summary>
        public long PatientId { get; set; }
        
        /// <summary>
        /// 医疗卡号
        /// </summary>
        public string CardNo { get; set; } = string.Empty;
        
        /// <summary>
        /// 患者姓名
        /// </summary>
        public string PatientName { get; set; } = string.Empty;
        
        /// <summary>
        /// 号类 (普通号、专家号、急诊号等)
        /// </summary>
        public string RegistrationType { get; set; } = string.Empty;
        
        /// <summary>
        /// 挂单费
        /// </summary>
        public decimal RegistrationFee { get; set; }
        
        /// <summary>
        /// 其他费用
        /// </summary>
        public decimal OtherFee { get; set; }
        
        /// <summary>
        /// 科室
        /// </summary>
        public string Department { get; set; } = string.Empty;
        
        /// <summary>
        /// 医师
        /// </summary>
        public string Doctor { get; set; } = string.Empty;
        
        /// <summary>
        /// 就诊日期
        /// </summary>
        public DateTime VisitDate { get; set; }
        
        /// <summary>
        /// 就诊时段 (上午、下午、晚上)
        /// </summary>
        public string VisitTimeSlot { get; set; } = string.Empty;
        
        // ========== 患者详细信息字段 ==========
        
        /// <summary>
        /// 身份证号
        /// </summary>
        public string IdCard { get; set; } = string.Empty;
        
        /// <summary>
        /// 性别 (0-女, 1-男)
        /// </summary>
        public int Gender { get; set; }
        
        /// <summary>
        /// 出生日期
        /// </summary>
        public DateTime BirthDate { get; set; }
        
        /// <summary>
        /// 联系电话
        /// </summary>
        public string Phone { get; set; } = string.Empty;
        
        /// <summary>
        /// 地址
        /// </summary>
        public string Address { get; set; } = string.Empty;
        
        /// <summary>
        /// 民族
        /// </summary>
        public string Ethnicity { get; set; } = string.Empty;
        
        /// <summary>
        /// 文化程度
        /// </summary>
        public string Education { get; set; } = string.Empty;
        
        /// <summary>
        /// 职业
        /// </summary>
        public string Occupation { get; set; } = string.Empty;
        
        /// <summary>
        /// 邮政编码
        /// </summary>
        public string PostalCode { get; set; } = string.Empty;
        
        /// <summary>
        /// 婚姻状况 (未婚、已婚、离异、丧偶等)
        /// </summary>
        public string MaritalStatus { get; set; } = string.Empty;
    }
}